// function add(x, y) {
// 	return x + y;
// }
// console.log(add(1));
// console.log(add(1, 2));
// console.log(add(1, 2, 3));
// function ji(x, y) {
// 	return x * y;
// }
// console.log(ji(4, 3));
// console.log(ji(2, 6, 4));
// const a = [1, '1', 4];
// const b = new Array(2);
// b.push(4, '1', 1, false);
// for (i = 0; i < b.length; i++) {
// 	console.log(b[i]);
// }
// for (i in b) {
// 	console.log(b[i]);
// }
// b.forEach((value, ind, b1) => {

// 	console.log(value, ind);
// });
// b.unshift("bb");
// b.splice(1, 1, "zz");
// b.shift();
// b.pop();
// b.slice(0, 2);
//console.log(b.includes(1));
// b.slice(1, 1, 'f ');
// console.log(a);
//console.log(b);
// console.log(b.indexOf(1));
//  console.log(b.lastIndexOf(1, 1));
// console.log(b.findIndex((value, ind, b1) => { if (value === 1) return true; }));
// console.log(b.find((value, ind, b1) => { if (value === 1) return true }));
// console.log(b.join("."));
// console.log(b.toString());
// console.log(b.join());
// console.log(b.map((value, ind, obj) => { return value + 1 }));
// const c = [1, 4, 6, 10, 8, 9];
// const d = [2, '2'];
// const e = [];
// console.log(c.sort());
// console.log(c.sort((a, b) => { return a - b }));
// console.log(c.sort((a, b) => { return b - a }));
// console.log(c.reverse());

// console.log(c.reduce((sum, value) => { return sum + value + 1 }, 7))
// for (let [index, item] of c.entries()) {
// 	console.log(index + ":" + item);
// }
// c.forEach((value, index, arr) => { e.push(value + 1) });
// console.log(e);
// b.fill('1', 0, 2);
// console.log(b);

// for (i = 0; i < c.length; i++) {
// 	if (c[i] >= 5 && c[i]) {
// 		for (j = 0; j <= i; j++) {
// 			d[i] = c[i]
// 		} console.log(d[j]);
// 	}
// }

// const cc = c.filter((value, ind) => { if (value > 5 && value < 10) { return value } });
// const dd = c.some((value, ind) => { if (value > 5 && value < 10) { return value } });
// console.log(c.concat(d));
// console.log(cc);
// console.log(dd);
// console.log(b.sort());

//数组
const a = Array();
for (i = 1; i <= 100; i++) {
	a.push(i);
}
console.log(a);
const b = a.map((value, ind, arr) => { return value + 1 });
console.log(b);
const c = a.filter((value, index, arr) => { if (value % 5 == 0) return value });
console.log(c);
const d = a.find((value, index, arr) => { if (value > 20) return value });
console.log(d);
const e = a.some((value, index, arr) => { if (value === 88) return value });
console.log(e);
const f = a.reduce((pre, cur, arr) => { return pre + cur });
console.log(f);
console.log(a.join("."));
console.log(a.toString());
console.log(a.length);
const g = a.splice(49, 2, "哈哈", "插队");
console.log(a);
console.log(a.indexOf(66));
console.log(a.findIndex((value, index, obj) => { if (value === 66) return index }));
//字符串
const name = "my name is wangzhe";
const world = "hello world";
const n = name.split('');
console.log(n);
const na = name.substr(4, 5);
console.log(na);
const wo = world.substring(4, 10);
console.log(wo);
//js
let obj = {};
obj["test"] = "测试";
obj["num"] = "2";
console.log(obj);
let obj1 = { 'arr': '[1,2,3]' };
console.log(obj1);
let object = Object.assign(obj, obj1);
console.log(object);
console.log(Object.keys(object));
console.log(object["test"]);
delete (object["arr"]);
console.log(object);